from xml.dom.minidom import parse
from montecarlo import Montecarlo
from marketData import MarketData
from payoff import Payoff

if __name__ == '__main__':
    import sys

quote = parse(open(sys.argv[1]))

marketData = MarketData(quote.getElementsByTagName("marketdata")[0])
contract = Payoff(quote.getElementsByTagName("contract")[0])

montecarlo = Montecarlo(contract, marketData)

print(montecarlo)
print(montecarlo.quote(100000, 1))
